package cn.schoolwow.flow.monitor.module.business.scheduleJob.definition.flow.button;

import cn.schoolwow.ams.module.block.listBlock.common.domain.operation.BlockButtonType;
import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;

public class AddForceCancelScheduleJobFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        flowContext.startFlow(new AddCancelScheduleJobButtonFlow())
                .putTemporaryData("mayInterruptIfRunning", true)
                .putInstanceData(BlockButtonType.Danger)
                .putTemporaryData("buttonName", "强制取消")
                .putTemporaryData("multipleButtonName", "批量强制取消")
                .execute();
    }

    @Override
    public String name() {
        return "添加强制取消定时任务按钮";
    }
}
